package com.gosophia.conferenceManagement.scheme.ws;

import java.util.List;

import com.gosophia.commons.OrderCondition;
import com.gosophia.commons.Page;
import com.gosophia.commons.PropertyFilter;
import com.gosophia.commons.exception.BusinessException;
import com.gosophia.commons.exception.ConcurrencyException;
import com.gosophia.commons.exception.ParameterException;
import com.gosophia.commons.exception.TechnicalException;
import com.gosophia.conferenceManagement.common.ws.ConferenceHandleWebService;
import com.gosophia.conferenceManagement.scheme.dto.SchemeJobDataDTO;
import com.gosophia.conferenceManagement.scheme.dto.SchemeTransientStoreDTO;
import com.gosophia.taskManagement.dto.JobDTO;
import com.gosophia.taskManagement.dto.MissionDTO;

public interface ConferenceSchemeWebService extends ConferenceHandleWebService {

	/**
	 * 新增方案业务数据
	 * 
	 * @param schemeJobData
	 *            不能为null,schemeJobData必须为null
	 * @throws BusinessException
	 */
	public SchemeJobDataDTO addShemeJobData(SchemeJobDataDTO schemeJobData)
			throws BusinessException, ParameterException, ConcurrencyException,
			TechnicalException;

	/**
	 * 更新方案业务数据
	 * 
	 * @param schemeJobData
	 *            不能为null,schemeJobData不能为null
	 * @throws BusinessException
	 */
	public SchemeJobDataDTO updateSchemeJobData(SchemeJobDataDTO schemeJobData)
			throws BusinessException, ParameterException, ConcurrencyException,
			TechnicalException;

	/**
	 * 根据jobId查找方案业务数据
	 * 
	 * @param jobId
	 *            不能为null
	 * @return
	 */
	public SchemeJobDataDTO findSchemeJobDataDTOByJobId(Long jobId)
			throws BusinessException, ParameterException, ConcurrencyException,
			TechnicalException;

	/**
	 * 根据jobId查找上一Job的业务数据
	 * 
	 * @param jobId不能为null
	 * @return
	 */
	public SchemeJobDataDTO findPreConferenceJobDataDTOByJobId(Long jobId)
			throws BusinessException, ParameterException, ConcurrencyException,
			TechnicalException;

	/**
	 * 根据JobId查找某一会议下已完成的方案历史审批记录
	 * 
	 * @param jobId
	 *            不能为null
	 * @return
	 */
	public List<JobDTO> findFinishedSchemeApprovalHistoryRecordByJobId(
			Long jobId) throws BusinessException, ParameterException,
			ConcurrencyException, TechnicalException;

	/**
	 * 方案流程处理接口
	 * 
	 * @param schemeJobDataDTO
	 * @throws BusinessException
	 */
	public void HandleConferenceSchemeTurning(Long jobId, Long operatorId,
			SchemeJobDataDTO schemeJobDataDTO) throws BusinessException,
			ParameterException, ConcurrencyException, TechnicalException;
	
	/**
     * 保存或更新会议方案暂存(包含大任务信息)
     * @param schemeTransientStoreDTO不能为null
     * @throws BusinessException
     */
    public Long saveOrUpdateSchemeTransientStore(SchemeTransientStoreDTO schemeTransientStoreDTO)throws BusinessException,
        ParameterException, ConcurrencyException, TechnicalException;
    
    /**
     * 删除会议方案暂存(包含大任务信息)
     * @param schemeTransientStoreId不能为null
     * @throws BusinessException
     */
    public void deleteSchemeTransientStore( Long schemeTransientStoreId) throws BusinessException,
        ParameterException, ConcurrencyException, TechnicalException;
    /**
     * 获取会议发起列表
     * @param userInfoId 不能为null
     * @param page page.pageSize>0 page.pageNo>0
     * @param propertyFilters
     * @param orderConditions
     * @return
     * @throws BusinessException
     * @throws ParameterException
     * @throws ConcurrencyException
     * @throws TechnicalException
     */
    public Page<SchemeTransientStoreDTO> findSchemeTransientStoreByPage(Long userInfoId,int pageSize,int pageNo, List<PropertyFilter> propertyFilters,
            List<OrderCondition> orderConditions) throws BusinessException,ParameterException, ConcurrencyException, TechnicalException;

    /**
     * 根据jobId查找会议方案暂存对象
     * @param jobId 不能为null
     * @return SchemeTransientStoreDTO实体,若jobId对应的实体不存在则返回null
     * @throws BusinessException
     */
    public SchemeTransientStoreDTO findTransientStoreByJobId(Long jobId)throws BusinessException;
    /**
     * 获取会议发起查询列表
     * @param userInfoId
     * @param pageSize
     * @param searchStr
     * @param pageNo
     * @param propertyFilters
     * @param orderConditions
     * @return
     * @throws BusinessException
     * @throws ParameterException
     * @throws ConcurrencyException
     * @throws TechnicalException
     */
    public Page<SchemeTransientStoreDTO> findTransientStoreBySearchNameAndPage(Long userInfoId,int pageSize,String searchStr,int pageNo,List<PropertyFilter> propertyFilters,
    		List<OrderCondition> orderConditions)throws BusinessException,ParameterException,ConcurrencyException,TechnicalException;
    /**
     * 根据id查找会议方案对象
     * @param id
     * @return
     * @throws BusinessException
     */
    public SchemeTransientStoreDTO findTransientStoreById(Long id)throws BusinessException,ParameterException,ConcurrencyException,TechnicalException;
    /**
     * 根据jobId查询MissionDTO
     * @param jobId 不能为null
     * @return
     */
    public MissionDTO findMissionByJobId(Long jobId)throws BusinessException,ParameterException,ConcurrencyException,TechnicalException;
}
